import React from "react";
import System from "@/views/systemManger/index"
import Login from "@/views/login/index"
import type {MenuProps} from "antd";
export interface RouteConfig{
    path:string
    name:string
    icon?:string
    hidden:boolean
    redirect?:string
    component?:React.ReactNode
    children?: RouteConfig[]
}
export const routes:RouteConfig[] = [
    {
        path:"/",
        name:"",
        hidden:false,
        redirect:"/home"
    },
    {
        path:"/login",
        hidden:false,
        name:"登录",
        component:<Login></Login>,
    },
    {
        path:"/system",
        hidden:true,
        name:"系统管理",
        component:<System></System>,
    },
    {
        path:"/user",
        hidden:true,
        name:"用户管理",
    },
    {
        path:"/role",
        hidden:true,
        name:"角色管理",
    },
    {
        path:"/menu",
        hidden:true,
        name:"菜单管理",
    },
    {
        path:"/order",
        hidden:true,
        name:"订单管理",
    },
    {
        path:"/order/list",
        hidden:true,
        name:"订单列表",
    },
    {
        path:"/order/back",
        hidden:true,
        name:"退货管理",
    },
    {
        path:"/shop",
        hidden:true,
        name:"商品管理",
    },
    {
        path:"/shop/list",
        hidden:true,
        name:"商品列表",
    },
    {
        path:"/shop/type",
        hidden:true,
        name:"商品类型",
    },
]

export const menuRoutes:MenuProps['items'] = [
    {
        key:"/system",
        icon:"",
        label:"系统管理",
        children:[
            {
                key:"/user",
                icon:"",
                label:"用户管理",
            },
            {
                key:"/role",
                icon:"",
                label:"角色管理",
            },
            {
                key:"/menu",
                icon:"",
                label:"菜单管理",
            }
        ]
    },
    {
        key:"/order",
        icon:"",
        label:"订单管理",
        children:[
            {
                key:"/order/list",
                icon:"",
                label:"订单列表",
            },
            {
                key:"/order/back",
                icon:"",
                label:"退货管理",
            }
        ]
    },
    {
        key:"/shop",
        icon:"",
        label:"商品管理",
        children:[
            {
                key:"/shop/list",
                icon:"",
                label:"商品列表",
            },
            {
                key:"/shop/type",
                icon:"",
                label:"商品类型",
            },
        ]
    }
]
